<?php

// | Copyright (c) 2019~2020 http://jiunidu.com All rights reserved.
// +----------------------------------------------------------------------
// | Author: huanglijun <80792275@qq.com>
// +----------------------------------------------------------------------

namespace service\pay;


abstract class PayBase 
{
    //支付平台，默认：0->自平台 1->微信 2->支付宝 3->银联
    protected $pay_platform=0;
    //订单号
    protected $order_id=null;
    //退款的订单号
    protected $refund_id=null;
    //支付的主体信息
    protected $order_body=null;
    //支付金额
    protected $pay_fee=null;
    //退款的金额
    protected $refund_fee=null;
    //支付交易号
    protected $transaction_id = null;
    /**
     * 生成支付参数,带签名的
     * @return mixed
     */
    abstract public function getPayParams();
    /**
     * 验证回调信息的签名
     * @return mixed
     */
    abstract public function check_notify_sign();
    /**
     * 处理第三方支付回调的时返回的数据
     * @return mixed
     */
    abstract public function return_notify_info();

    /**
     * @return null
     */
    public function get_pay_platform()
    {
        return $this->pay_platform;
    }
    
    /**
     * @param null $pay_platform
     */
    public function set_pay_platform($pay_platform)
    {
        $this->pay_platform = $pay_platform;
    }

    /**
     * @return null
     */
    public function getOrderId()
    {
        return $this->order_id;
    }

    /**
     * @param null $order_id
     */
    public function setOrderId($order_id)
    {
        $this->order_id = $order_id;
    }

     /**
     * @return null
     */
    public function getRefundId()
    {
        return $this->refund_id;
    }

    /**
     * @param null $order_id
     */
    public function setRefundId($refund_id)
    {
        $this->refund_id = $refund_id;
    }

    /**
     * @return mixed
     */
    public function getOrderBody()
    {
        return $this->order_body;
    }

    /**
     * @param mixed $order_body
     */
    public function setOrderBody($order_body)
    {
        $this->order_body = $order_body;
    }

    /**
     * @return mixed
     */
    public function getPayFee()
    {
        return $this->pay_fee;
    }

    /**
     * @param mixed $pay_fee
     */
    public function setPayFee($pay_fee)
    {
        $this->pay_fee = $pay_fee;
    }

    /**
     * @return mixed
     */
    public function getRefundFee()
    {
        return $this->refund_fee;
    }

    /**
     * @param mixed $pay_fee
     */
    public function setRefundFee($refund_fee)
    {
        $this->refund_fee = $refund_fee;
    }


    /**
     * @return null
     */
    public function getTransactionId()
    {
        return $this->transaction_id;
    }

    /**
     * @param null $transactionId
     */
    public function setTransactionId($transaction_id)
    {
        $this->transaction_id = $transaction_id;
    }
}